//============================================================================
// Name        : freeze-test-io.cpp
// Author      : Peter N Andreasen
// Version     :
// Copyright   : LGPL
// Description : Bitwise storage to a file
//============================================================================

#include "bitstore.h"

using std::cout;
using std::endl;

int main() {
	unsigned long buf = 0x1000;
	double X = 3.14;
	//memcpy(&buf, "test", 4);
	BitStore bs;
	bs.open("testfile.dat", ios::out);
	bs.out(buf, 32);
	store(bs, X);
	bs.close();
	buf = 0;
	X = 0;
	bs.open("testfile.dat", ios::in);
	buf = bs.in(32);
	std::cout << buf << std::endl;
	retrieve(bs, X);
	cout << X << endl;
	bs.close();
	return 0;
}
